vcMatrix

A 4x4 matrix which is generally used to perform linear transformations and contains the position and orientation of objects.

See in: Overview

Module: vcCore

Parent: -

Children -

Referenced by: vcAnnotation.Location, vcAnnotation.Position, vcAssemblyPatternSlot.Position, vcAssemblyStep.AbsoluteFrame, ... (see more)
vcAnnotation.Location
vcAnnotation.Position
vcAssemblyPatternSlot.Position
vcAssemblyStep.AbsoluteFrame
vcAssemblyStep.RelativeFrame
vcBaseFrame.PositionMatrix
vcBeginWorkData.ResourcePositionMatrix
vcBeginWorkData.WorkPositionMatrix
vcBufferProductsStatement.Offset
vcCamera.Matrix
vcComponent.MovementOrigin
vcContainer.getPathPosition()
vcDimension.Location
vcDimension.Position1
vcDimension.Position2
vcFeature.NodePositionMatrix
vcFeature.PositionMatrix
vcFrameFeature.FramePositionMatrix
vcFrameFeature.OriginalFramePositionMatrix
vcFrameKinematicData.Position
vcFrameSet.getFrame()
vcFrameTarget.PositionMatrix
vcKinSolver.BaseMatrix
vcKinSolver.RootMatrix
vcKinSolver.ToolMatrix
vcKinematicFrame.PositionMatrix
vcKinematicFrame.WorldPositionMatrix
vcLinearTarget.Target
vcLinkJoint.PositionMatrix
vcMatrixExpressionProperty.CalculatedValue
vcMatrixListProperty.Value
vcMatrixProperty.Value
vcMatrixSignal.Value
vcMatrixStepProperty.AllowedValues
vcMatrixStepProperty.DefaultValue
vcMatrixStepProperty.Value
vcMotionTarget.BaseMatrix
vcMotionTarget.Target
vcMotionTarget.ToolMatrix
vcMotionTarget.getPositionerRootToPositionerFlange()
vcMotionTarget.getRobotRootToRobotFlange()
vcMotionTarget.getRootNodeToPositionerRoot()
vcMotionTarget.getRootNodeToRobotRoot()
vcMotionTarget.getSimWorldToRobotTool()
vcMotionTarget.getSimWorldToRobotWorld()
vcMotionTarget.getSimWorldToRootNode()
vcNode.InverseWorldPositionMatrix
vcNode.PositionMatrix
vcNode.WorldPositionMatrix
vcNode.localToWorld()
vcNode.worldToLocal()
vcPickedTopologyCurveInfo.CurvePositions
vcPositionFrame.Position
vcPositionFrame.PositionInReference
vcPositionFrame.PositionInWorld
vcProduct.WorldPositionMatrix
vcPtpTarget.Target
vcRaycastResult.Position
vcRobotController.WorldTransformMatrix
vcSetBaseStatement.Position
vcSetToolStatement.Position
vcSnapService.TargetMatrix
vcText3DSet.Matrix
vcToolFrame.CenterOfGravity
vcTopology.getCurvePosition()
vcTopology.getCurvePositions()
vcTopology.getFacePlaneIntersections()
vcTransportNode.VisualPosition
vcTransportPatternInStatement.Offset
vcTransportTarget.ProductPosition
vcTransportTarget.ProductPositionInNode
vcTransportTarget.ResourcePosition
vcTransportTarget.ResourcePositionInNode
vcView.CameraMatrix
vcVolumeDetector.Transformation

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
AvcVectorRWGets or sets Approach vector that is unit vector in Z-axis direction.
AwRealRWGets or sets w-component of the Approach vector.
AxRealRWGets or sets x-component of the Approach vector.
AxisAnglevcVectorRWGets or sets the orientation of the matrix as a rotation of its identity matrix about the axis defined by the XYZ values of the returned vector. The W property of the returned vector is the rotation angle (in degrees).
AyRealRWGets or sets y-component of the Approach vector.
AzRealRWGets or sets z-component of the Approach vector.
EulervcVectorRWGets or sets the orientation of the matrix as a set of absolute rotations (in fixed coordinate system) around the Z-axis,
See more
followed by the Y-axis, and then again the Z-axis, in the form of a vector containing those angles (in degrees).
NvcVectorRWGets or sets Normal vector that is unit vector in X-axis direction.
NwRealRWGets or sets w-component of the Normal vector.
NxRealRWGets or sets x-component of the Normal vector.
NyRealRWGets or sets y-component of the Normal vector.
NzRealRWGets or sets z-component of the Normal vector.
OvcVectorRWGets or sets Orientation vector that is unit vector in Y-axis direction.
OwRealRWGets or sets w-component of the Orientation vector.
OxRealRWGets or sets x-component of the Orientation vector.
OyRealRWGets or sets y-component of the Orientation vector.
OzRealRWGets or sets z-component of the Orientation vector.
PvcVectorRWGets or sets Position vector.
PwRealRWGets or sets w-component of the Position vector.
PxRealRWGets or sets x-component of the Position vector.
PyRealRWGets or sets y-component of the Position vector.
PzRealRWGets or sets z-component of the Position vector.
QuaternionvcVectorRWGets or sets the orientation of the matrix as a quaternion in the form of a vector.
Valueslist[Real]RGets vcMatrix values as a list of 16 Reals.
WPRvcVectorRWGets or sets roll, pitch and yaw angles.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
identityNoneNoneSets matrix to equal its identity.
invertNoneNoneSets the matrix to equal its inverse.
newvcMatrixNoneCreates a new identity matrix.

Returns:
vcMatrix: Created vcMatrix.
newvcMatrixvcMatrix otherCreates a copy of the given vcMatrix.
See more
Parameters:
copy (vcMatrix): The vcMatrix to create copy from.

Returns:
vcMatrix: Created vcMatrix.
newvcMatrixvcVector N,
vcVector O,
vcVector A,
vcVector P
Creates a new vcMatrix from 4 vectors.
See more
Parameters:
N (vcVector): Normal vector (unit vector in X-axis direction).
O (vcVector): Orientation vector (unit vector in Y-axis direction).
A (vcVector): Approach vector (unit vector in Z-axis direction).
P (vcVector): Position vector.

Returns:
vcMatrix: Created vcMatrix.
newvcMatrixReal Nx,
Real Ny,
Real Nz,
Real Ox,
Real Oy,
Real Oz,
Real Ax,
Real Ay,
Real Az,
Real Px,
Real Py,
Real Pz
Creates a new vcMatrix object from 12 Real values. The bottom row (W-components) of the vcMatrix is defined as (0, 0, 0, 1).

Parameters:
Nx (Real): X-component of Normal vector.
Ny (Real): Y-component of Normal vector.
Nz (Real): Z-component of Normal vector.
Ox (Real): X-component of Orientation vector.
Oy (Real): Y-component of Orientation vector.
Oz (Real): Z-component of Orientation vector.
Ax (Real): X-component of Approach vector.
Ay (Real): Y-component of Approach vector.
Az (Real): Z-component of Approach vector.
Px (Real): X-component of Position vector.
Py (Real): Y-component of Position vector.
Pz (Real): Z-component of Position vector.

Returns:
vcMatrix: Created vcMatrix.
newvcMatrixReal Nx,
Real Ny,
Real Nz,
Real Nw,
Real Ox,
Real Oy,
Real Oz,
Real Ow,
Real Ax,
Real Ay,
Real Az,
Real Aw,
Real Px,
Real Py,
Real Pz,
Real Pw
Creates a new vcMatrix object from 16 Real values.

Parameters:
Nx (Real): X-component of Normal vector.
Ny (Real): Y-component of Normal vector.
Nz (Real): Z-component of Normal vector.
Nw (Real): W-component of Normal vector.
Ox (Real): X-component of Orientation vector.
Oy (Real): Y-component of Orientation vector.
Oz (Real): Z-component of Orientation vector.
Ow (Real): W-component of Orientation vector.
Ax (Real): X-component of Approach vector.
Ay (Real): Y-component of Approach vector.
Az (Real): Z-component of Approach vector.
Aw (Real): W-component of Approach vector.
Px (Real): X-component of Position vector.
Py (Real): Y-component of Position vector.
Pz (Real): Z-component of Position vector.
Pw (Real): W-component of Position vector.

Returns:
vcMatrix: Created vcMatrix.
rotateAbsVNonevcVector vector,
Real angle
Rotates the matrix around given axis in absolute coordinate system.
See more
Parameters:
vector (vcVector): Defines the axis of rotation.
angle (Real): Defines the amount of rotation.
rotateAbsXNoneReal angleRotates the matrix around X-axis in absolute coordinate system.

Parameters:
angle (Real): Defines the amount of rotation.
rotateAbsYNoneReal angleRotates the matrix around Y-axis in absolute coordinate system.

Parameters:
angle (Real): Defines the amount of rotation.
rotateAbsZNoneReal angleRotates the matrix around Z-axis in absolute coordinate system.

Parameters:
angle (Real): Defines the amount of rotation.
rotateRelVNonevcVector vector,
Real angle
Rotates the matrix around given axis in coordinate system relative to matrix position.
See more
Parameters:
vector (vcVector): Defines the axis of rotation.
angle (Real): Defines the amount of rotation.
rotateRelXNoneReal angleRotates the matrix around X-axis in coordinate system relative to matrix position.

Parameters:
angle (Real): Defines the amount of rotation.
rotateRelYNoneReal angleRotate the matrix around Y-axis in coordinate system relative to matrix position.

Parameters:
angle (Real): Defines the amount of rotation.
rotateRelZNoneReal angleRotates the matrix around Z-axis in coordinate system relative to matrix position.

Parameters:
angle (Real): Defines the amount of rotation.
scaleAbsNoneReal x,
Real y,
Real z
Scales the matrix in relation to 3D world origin.
See more
Parameters:
x (Real): Scaling factor in x-direction.
y (Real): Scaling factor in y-direction.
z (Real): Scaling factor in z-direction.
scaleRelNoneReal x,
Real y,
Real z
Scales the matrix in relation to matrix position.
See more
Parameters:
x (Real): Scaling factor in x-direction.
y (Real): Scaling factor in y-direction.
z (Real): Scaling factor in z-direction.
setIJKNoneReal i,
Real j,
Real k
Sets the orientation of the matrix so that its Approach vector (Z-axis) is aligned with a vector defined by i, j and k arguments.
See more
Parameters:
i (Real): i-component of the alignment vector.
j (Real): j-component of the alignment vector.
k (Real): k-component of the alignment vector.
toStringStringOptional Keyword[format = vcMatrixFormat],
Optional Keyword[precision = Integer],
Optional Keyword[includeZeros = Boolean]
Returns string representation of matrix.
See more
Parameters:
format (vcMatrixFormat): The representation format.
precision (Integer): Precision of real values.
includeZeros (Boolean): Include zeros up to the defined precision limit. (P=45.000000 vs P=45).

Returns:
String: String representation of matrix.
translateAbsNoneReal x,
Real y,
Real z
Translates the matrix position by a given offset in reference (Parent) coordinate system.
Parent can be for example the World or a Node.
See more
Parameters:
x (Real): Offset in x-direction.
y (Real): Offset in y-direction.
z (Real): Offset in z-direction.
translateRelNoneReal x,
Real y,
Real z
Translates the matrix position by a given offset in Object coordinate system.
See more
Parameters:
x (Real): Offset in x-direction.
y (Real): Offset in y-direction.
z (Real): Offset in z-direction.
uniformNoneNoneModifies the matrix to be orthogonal and contain no scaling.
zerovcMatrixNoneCreates a new matrix with all values zeros.

Returns:
vcMatrix: Created vcMatrix.

Example: Move Component Location

""" This example shows how to translate a component relatively to its current position. """

import vcCore as vc

comp = vc.getComponent()
mtx = comp.PositionMatrix
mtx.translateRel(0,0,1000)
comp.PositionMatrix = mtx
print (mtx)

Example: Zero Component Location

""" This example shows how to set the location of a component to zero. """

import vcCore as vc

comp = vc.getComponent()
comp.WorldPositionMatrix = vcMatrix.new()
print (comp.WorldPositionMatrix)

Example: Move Component with Vector

"""
a snippet for moving a component using vcVector
"""

import vcCore as vc

comp = vc.getComponent()
app = vc.getApplication()
vec = vc.vcVector.new(200, 400, 600)

mtx = comp.PositionMatrix

mtx.P = vec
comp.PositionMatrix = mtx
app.render()